package com.gateway.security.common.matcher;

import com.gateway.common.dto.ApiDefinition;
import com.gateway.common.enums.AuthenticationTypeEnum;

import java.util.List;

/**
 * @program: api-gateway
 * @description:
 * @author: YuKai Fan
 * @create: 2025/2/11 22:39
 **/
public class AuthenticationServerWebExchangeMatcher extends ApiDefintionServerWebExchangeMatcher {

    public static final AuthenticationServerWebExchangeMatcher INSTANCE = new AuthenticationServerWebExchangeMatcher();

    private AuthenticationServerWebExchangeMatcher() {
    }

    public static AuthenticationServerWebExchangeMatcher getInstance() {
        return INSTANCE;
    }

    @Override
    protected boolean match(ApiDefinition apiDefinition) {
        return Boolean.TRUE.equals(apiDefinition.getAuthentication());
    }
}
